(******************************************************)
(*													  *)
(*	file:  DragonModule.m							  *)
(*													  *)
(*	Dragon method - see definition module for		  *)
(*	description.									  *)
(*													  *)
(*	Written in SemperSoft Modula-2 v.1.1.2			  *)
(*													  *)
(*	Allen Stenger	August 1989  					  *)
(*													  *)
(******************************************************)

IMPLEMENTATION MODULE DragonModule;

FROM Pen		IMPORT Go, Turn;

PROCEDURE Dragon( order : INTEGER );
BEGIN
	IF order = 0
	THEN	
		Go( 10 );
	ELSE
		IF order > 0
		THEN
			Dragon( order - 1 );
			Turn( 90 );
			Dragon( 1 - order );
		ELSE
			Dragon( -1 - order );
			Turn( -90 );
			Dragon( 1 + order );
		END; (* IF *)
	END; (* IF *)
END Dragon;

BEGIN
END DragonModule.